package com.imc.beans;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * ImcDataVersionId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class ImcDataVersionId implements java.io.Serializable {

	// Fields

	private Integer updId;
	private String imcDataName;

	// Constructors

	/** default constructor */
	public ImcDataVersionId() {
	}

	/** full constructor */
	public ImcDataVersionId(Integer updId, String imcDataName) {
		this.updId = updId;
		this.imcDataName = imcDataName;
	}

	// Property accessors

	@Column(name = "upd_id", nullable = false)
	public Integer getUpdId() {
		return this.updId;
	}

	public void setUpdId(Integer updId) {
		this.updId = updId;
	}

	@Column(name = "imc_data_name", nullable = false, length = 20)
	public String getImcDataName() {
		return this.imcDataName;
	}

	public void setImcDataName(String imcDataName) {
		this.imcDataName = imcDataName;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ImcDataVersionId))
			return false;
		ImcDataVersionId castOther = (ImcDataVersionId) other;

		return ((this.getUpdId() == castOther.getUpdId()) || (this.getUpdId() != null
				&& castOther.getUpdId() != null && this.getUpdId().equals(
				castOther.getUpdId())))
				&& ((this.getImcDataName() == castOther.getImcDataName()) || (this
						.getImcDataName() != null
						&& castOther.getImcDataName() != null && this
						.getImcDataName().equals(castOther.getImcDataName())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getUpdId() == null ? 0 : this.getUpdId().hashCode());
		result = 37
				* result
				+ (getImcDataName() == null ? 0 : this.getImcDataName()
						.hashCode());
		return result;
	}

}